<?php

class Application_Form_AuthForm extends Zend_Form
{

	public function init()
	{
		$this->setName('user');

		$id = new Zend_Form_Element_Hidden('id');
		$id->addFilter('Int')
		->setDecorators(array('ViewHelper'));

		$login = new Zend_Form_Element_Text('login');
		$login->setLabel('login')
		->setRequired('true')
		->addFilter('StripTags')
		->addFilter('StringTrim')
		->addValidator('NotEmpty')
		->setAttrib("autocomplete", "off")
		//->setValue('Username')
		->setDecorators(array('ViewHelper'));

		$pwd = new Zend_Form_Element_Password('pwd');
		$pwd->setLabel('pwd')
		->setRequired('true')
		->addFilter('StripTags')
		->addFilter('StringTrim')
		->addValidator('NotEmpty')
		->setAttrib("autocomplete", "off")
		->setDecorators(array('ViewHelper'));

		$send = new Zend_Form_Element_Submit('send');
		$send->setAttrib('id','send_button')
		->setDecorators(array('ViewHelper'));
			
		$this->addElements(array($id,$login,$pwd,$send));

	}


}

